package com.jia.springcloud;

import com.jia.myribbon.RibbonRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

/**
 * @author 1038940655
 * @create 2021/1/13 20:20
 */
@SpringBootApplication
@EnableEurekaClient//开启这个和Server对应，自动注册到eureka服务中去了
//在微服务启动的时候就能加载自定义的Ribbon类(自定义的规则会覆盖原有默认的规则)
@RibbonClient(name = "SPRINGCLOUD-PROVIDER-DEPT",configuration = RibbonRule.class)//开启负载均衡,并指定自定义的规则
public class DeptConsumer_8080 {
    public static void main(String[] args) {
        SpringApplication.run(DeptConsumer_8080.class,args);
    }
}
